/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	hey 
 * 
 * <p>描   述  :   LawInformOpen.java for com.pengtu.gsj.entity.lz    </p>
 * 
 * <p>最后修改 : $: Sep 8, 2017-3:46:14 PM v 1.0.0	 hey   $ </p>
 * 
*/

package com.pengtu.gsj.entity.lzgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * LawInformOpen
 * 执法信息公开化
 * Sep 8, 2017 3:46:14 PM
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name="T_LZ_LAWINFORMOPEN")
public class LawInformOpen extends IdEntity {

	private static final long serialVersionUID = 1L;
	
	private String testYear;				//检查时间
	private String organizationName;		//机构名称
	private String organizationType;		//机构类型
	private String publishWay;				//政策信息公布方式
	private String publishFull;				//公布是否完整全面
	private String remark;			
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "TESTYEAR")
	public String getTestYear() {
		return testYear;
	}
	@Column(name = "ORGANIZATIONNAME")
	public String getOrganizationName() {
		return organizationName;
	}
	@Column(name = "ORGANIZATIONTYPE")
	public String getOrganizationType() {
		return organizationType;
	}
	@Column(name = "PUBLISHWAY")
	public String getPublishWay() {
		return publishWay;
	}
	@Column(name = "PUBLISHFULL")
	public String getPublishFull() {
		return publishFull;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setTestYear(String testYear) {
		this.testYear = testYear;
	}
	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}
	public void setOrganizationType(String organizationType) {
		this.organizationType = organizationType;
	}
	public void setPublishWay(String publishWay) {
		this.publishWay = publishWay;
	}
	public void setPublishFull(String publishFull) {
		this.publishFull = publishFull;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
